package com.dev;
import android.appwidget.AppWidgetManager;
import android.appwidget.AppWidgetProvider;
import android.content.Context;
import android.widget.RemoteViews;

public class MyAppWidgetProvider extends AppWidgetProvider {

    @Override
    public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {
        for (int appWidgetId : appWidgetIds) {
            // 创建一个RemoteViews对象，指定布局
            RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget_shortcut);

            // 更新小组件视图
            appWidgetManager.updateAppWidget(appWidgetId, views);
        }
    }
    
    
}
